<?php
/**
 * Created by PhpStorm.
 * User: huyong
 * Date: 2017/12/25
 * Time: 下午12:31
 */

namespace Someline\Repositories\Eloquent;


use Someline\Models\Foundation\Setting;
use Someline\Repositories\Interfaces\PublishRepository;
use Someline\Validators\PublishValidator;

class PublishRepositoryEloquent extends BaseRepository implements PublishRepository
{
    /**
     * @var PublishRepository
     */
    protected $repository;

    /**
     * @var PublishValidator
     */
    protected $validator;

    public function __construct(PublishRepository $repository, PublishValidator $validator)
    {
        $this->repository = $repository;
        $this->validator = $validator;
    }

    public function model()
    {
        return Setting::class;
    }

    public function store(Setting $request)
    {
        $data = $request->all();
        $setting = $this->repository->create($data);
        return $setting;
    }


}